Example embodiments of the inventive concepts relate to a method of operating an encoder, and more particularly, to a method of operating an encoder capable of predicting a band position and increasing and/or maximizing a compression ratio using variable length coding in sample adaptive offset (SAO) for images and/or videos, and to a method of operating a system on chip (SoC) including the encoder.
With the development and propagation of hardware capable of playing and storing high-resolution or high-definition video content, need of video codec which codes or encodes the high-resolution or high-definition video content is increasing.
High efficient video coding (HEVC), a video compression standard, uses SAO in order to decrease and/or minimize an error between an original image and a restored image. The SAO may be divided into a band offset type and an edge offset type. In the band offset type, a band position value is coded as a parameter indicating the position of an offset band. Conventional video codecs use a fixed bit to code the band position. Such conventional video codec has a problem in terms of internal complexity and/or inefficient compression.